﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ErrorCode
{
    /// <summary>
    /// API返回状态码
    /// </summary>
    public enum ResultCode
    {

        /// <summary>
        /// 成功
        /// </summary>
        成功 = 200,

        /// <summary>
        /// 参数错误
        /// </summary>
        参数错误 = 400,

        /// <summary>
        /// 未授权
        /// </summary>
        未授权 = 401,

        /// <summary>
        /// 禁止访问
        /// </summary>
        禁止访问 = 403,

        /// <summary>
        /// 资源不存在
        /// </summary>
        资源不存在 = 404,

        /// <summary>
        /// 服务器错误
        /// </summary>
        服务器错误 = 500,

        /// <summary>
        /// 服务不可用
        /// </summary>
        服务不可用 = 503,

        /// <summary>
        /// 数据已存在
        /// </summary>
        数据已存在 = 600,

        /// <summary>
        /// 数据不存在
        /// </summary>
        数据不存在 = 601,

        /// <summary>
        /// 操作失败
        /// </summary>
        操作失败 = 602,

        /// <summary>
        /// 用户不存在
        /// </summary>
        UserNotFound = 1001,

        /// <summary>
        /// 密码错误
        /// </summary>
        PasswordIncorrect = 1002,

        /// <summary>
        /// 用户已被禁用
        /// </summary>
        UserDisabled = 1003,

        /// <summary>
        /// 用户名已存在
        /// </summary>
        UserNameExists = 1004,

        /// <summary>
        /// 令牌无效
        /// </summary>
        InvalidToken = 1005,

        /// <summary>
        /// 令牌已过期
        /// </summary>
        TokenExpired = 1006,
        
        /// <summary>
        /// 生产批次重复
        /// </summary>
        DuplicateProductionBatch = 1007,
        
        /// <summary>
        /// 验证码错误
        /// </summary>
        验证码错误 = 1008,
        
        /// <summary>
        /// 验证码已过期
        /// </summary>
        验证码已过期 = 1009,
        SystemError = 1010,
        
        /// <summary>
        /// 资源未找到
        /// </summary>
        NotFound = 1011,
        
        /// <summary>
        /// 重复记录
        /// </summary>
        DuplicateRecord = 1012,
        
        /// <summary>
        /// 内部服务器错误
        /// </summary>
        InternalServerError = 1013
    }
}
